package com.tepth.busfix.adapter;

import android.content.Context;
import android.view.LayoutInflater;

import com.chad.library.adapter.base.BaseSectionQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.tepth.busfix.R;
import com.tepth.busfix.bean.reponse.FaultSection;

import java.util.List;

/**
 * Created by pc on 2017/3/16.
 */

public class SuggestTypeAdapter extends BaseSectionQuickAdapter<FaultSection, BaseViewHolder> {
    private LayoutInflater mInflater;

    public SuggestTypeAdapter(Context context, int layoutResId, int sectionHeadResId, List data) {
        super(layoutResId, sectionHeadResId, data);
        mInflater = LayoutInflater.from(context);
    }

    @Override
    protected void convertHead(BaseViewHolder helper, FaultSection item) {
        helper.setText(R.id.tv_header, item.header);
    }

    @Override
    protected void convert(BaseViewHolder helper, FaultSection item) {

//        TagFlowLayout tagFlowLayout = helper.getView(R.id.id_tag_flow_layout);
//        TagAdapter<String> tagAdapter = new TagAdapter<String>(item.t) {
//            @Override
//            public View getView(FlowLayout parent, int position, String fault) {
//                TextView tv = (TextView) mInflater.inflate(R.layout.view_tv,
//                        parent, false);
//                tv.setText(fault);
//                return tv;
//            }
//        };
//        tagFlowLayout.setAdapter(tagAdapter);
    }
}
